<?php use_helper('Date'); $sf_user->setCulture('ru_RU'); ?>

<!-- Update Slot -->
<?php if(!empty($article['tags'])):?>
	<?php slot('related') ?>
		<?php include_component('articles','bytag',array('tags'=>$article['tags'], 'id'=>$article['id'], 'limit'=>5))?>
		<?php include_component('news','bytag',array('tags'=>$article['tags'], 'id'=>$article['id'], 'limit'=>3))?>
		<?php include_component('releases','bytag',array('tags'=>$article['tags'], 'id'=>$article['id'], 'limit'=>3))?>				
	<?php end_slot(); ?>
<?php endif;?>

<div class="article">
		<?php if($article['image']):?>
			<img title="<?php echo $article['image_text'] ?>" src="/uploads/articles/thumbnail_150_150/<?php echo $article['image']?>"/>
		<?php endif;?>
		<span class="entity_title"><?php echo $article['title']?></span><br/>
		<span class="cat_link">
			<?php echo link_to($article['ArticleCategory']['title'],'view_articles_category',$article['ArticleCategory'],"title='Показать все статьи по категории ".$article['ArticleCategory']['title']."'");?> | 
			<?php echo format_datetime($article['updated_at'],'f')?><br/>
		</span><br/>
		<div class="main_description">
		<div id="hypercontext"><index>
		<?php echo htmlspecialchars_decode($article['body'])?>
		</index></div>
		
		<script type="text/javascript">
var begun_auto_pad = 214482100;
var begun_block_id = 214501108;
</script>
<script src="http://autocontext.begun.ru/autocontext2.js" type="text/javascript"></script>
		
		</div>
		<?php $images = $article->getAdditionalImages();
		if(!empty($images)):?>
			<div class="additional_images_container">
				<ul id="mycarousel" class="jcarousel-skin-tango">
					<?php foreach($images as $Image):?>
						<li><a class="lightsGal" href="/uploads/articles/thumbnail_600_600/<?php echo $Image['image']?>" zoomimage="<?php echo $Image['id']?>" zoomimagebox="zoomimage_<?php echo $Image['id']?>" id="zoomimage_<?php echo $Image['id']?>_trigger"><img src="/uploads/articles/thumbnail_100_100/<?php echo $Image['image']?>"/></a></li>
					<?php endforeach;?>
				</ul>
				<div class="clear"></div>
			</div>			
		<?php endif;?>
		<span class="cat_link">
			<?php if(!empty($article['tags'])):?>
				Теги:	<?php foreach(explode(',',$article['tags']) as $tag):?>
							<?php echo link_to($tag,'articles/tags?tag='.$tag)?> 
						<?php endforeach;?>
			<?php endif;?>
		</span>		
</div>

<script type="text/javascript">
jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel(); $('a.lightsGal').zoomimage({controls:false});
});
</script>
<?php include_component('banners','get468x60')?>
<?php if($article['is_allowed_comments']) include_component('comment','showlist',array('entity_type' => 'article', 'entity_id' => $article['id'])) ?>